fix: improve Vector Stores OpenAI API conformance#5398
Merged
leseb merged 16 commits intollamastack:mainfrom Apr 8, 2026
Merged
fix: improve Vector Stores OpenAI API conformance#5398leseb merged 16 commits intollamastack:mainfrom
leseb merged 16 commits intollamastack:mainfrom
Conversation
Fix schema issues in the Vector Stores API to improve OpenAI conformance from 61.3% to 87.1%. Key changes: - Add VectorStoreExpirationAfter model with anchor/days fields - Add VectorStoreStatus and VectorStoreFileBatchFileEntry types - Make required fields non-optional (name, usage_bytes, status, etc.) - Fix object literal types to match OpenAI spec - Add missing error codes (unsupported_file, invalid_file) - Make metadata nullable to match OpenAI spec Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Contributor
✱ Stainless preview buildsThis PR will update the
|
Collaborator
|
Nice |
Fix vector_store.files_batch typo to vector_store.file_batch (matching OpenAI spec). Add missing usage_bytes field to test constructors after making it required. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
… fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
The usage_bytes field was made required but many code paths construct VectorStoreFileObject and VectorStoreObject without setting it, causing 500 errors during file search operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Making usage_bytes optional is intentional - the runtime doesn't always have this value available (e.g. during file search operations). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
The name field was changed from optional to required, but stored vector stores may have name=null. Default to empty string to prevent validation errors when loading existing data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
…ge in test The VectorStoreSearchResponsePage model now requires the has_more field, but the test_file_search_uses_default_search_mode_from_config test was not updated to include it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
The vector store model changes altered how data is serialized in the LLM request body during file_search operations, causing recording hash mismatches in replay mode. Re-recorded the affected filter test recordings to match the updated serialization format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
franciscojavierarceo
approved these changes
Apr 8, 2026
franciscojavierarceo
added a commit
to franciscojavierarceo/llama-stack
that referenced
this pull request
Apr 8, 2026
Includes fix: improve Vector Stores OpenAI API conformance (llamastack#5398) BREAKING CHANGE: Vector Stores API schema updated for OpenAI conformance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix schema issues in the Vector Stores API to improve OpenAI conformance from 61.3% to ~87%.
Supersedes #5394 (which was too broad, mixing embeddings + vector stores + OpenAPI generator changes).
Key changes
VectorStoreExpirationAftermodel withanchor/daysfieldsVectorStoreStatusliteral type andVectorStoreFileBatchFileEntrymodelname,usage_bytes,status,has_more)objectfields to useLiteraltypes with correct valuesunsupported_file,invalid_file)metadatanullable to match OpenAI specdescriptionfield to vector store create requestFiles changed (6 source + regenerated specs)
src/llama_stack_api/vector_io/models.py- schema fixessrc/llama_stack/core/routers/vector_io.py- pass newly required fieldssrc/llama_stack/providers/utils/memory/openai_vector_store_mixin.py- pass newly required fieldsTest plan
🤖 Generated with Claude Code